<?php
/**
 *  view: part view, pokes list
 *  File: pokes/pokes_list.php
 */
?>


      <?php
        
      if( isset($pokes) && count($pokes)>0 )
      {
        $poke_cost = $this->config->item('poke_cost');
        foreach ($pokes as $row)
        {
          $class_new = (0==$row->reply)?" new ":"";
          $name = ($row->name!="")?$row->name:$row->username;
          if( $row->image_name != NULL )            
             $image = "<img src='".base_url()."profile/image/thumb/{$row->user_id}/{$row->image_name}' alt='{$row->username}'>";            
           else
             $image = "<img src='".base_url()."img/no_photo.gif' alt=''>";
          echo "
            <div class='notifications {$class_new}'>              
              <a href='javascript:remove_poke({$row->id})' class='delete-notif confirmLink' name='' title='".lang('remove_poke')."' alt='".lang('confirm_remove_poke')."' ></a>
              <a href='".base_url()."profile/view-profile/{$row->username}.htm'>{$image}<span class='name'>{$name} ".lang('you_push')."</span><span class='time'>{$row->timestamp}</span></a>
              <a href='javascript:send_poke({$row->user_id},{$row->poke_id})' class='poke-back confirmLink' title='".sprintf(lang('push_back'),$poke_cost)."' alt='".sprintf(lang('confirm_send_poke'),$poke_cost)."'  >".sprintf(lang('push_back'),$poke_cost)."</a>
              <div class='clr'></div>
          </div><!--End notifications-->

            ";
        }
      }
      //<input class='delete-notif' name='' type='button'>
      ?>

        
        <div class="clr"></div>               
        <p id="contentspaginate" class="paginationstyle pagination" align="center">
					Página: <a href="#" rel="previous" class="imglinks"><<  </a> &nbsp; <span class="flatview"></span> &nbsp; <a href="#" rel="next"> >></a>
       </p>
       <script language='javascript' >
          var contents_home=new virtualpaginate({
              piececlass: "notifications",
              piececontainer: 'div', 
              pieces_per_page: 10,
              defaultpage: 0,
              wraparound: false,
              persist: false
          })

          contents_home.buildpagination(["contentspaginate"]);
        </script>	
        <script src="<?php echo base_url(); ?>js/dialog.js"></script>